package com.bee.admin.modular.main.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import com.bee.admin.modular.main.service.IndexPageService;
import com.bee.admin.vo.CategoryVO;
import com.bee.admin.vo.ContentPic;
import com.bee.admin.vo.IndexVO;
import com.bee.admin.vo.NavVO;

/**
 * @author jont
 *
 */
@Service
public class IndexPageServiceImpl implements IndexPageService {

	public IndexVO getIndexVo() {
		IndexVO vo = new IndexVO();
		vo.setNav(getNav());
		vo.setContentPic(getContentPic());
		vo.setCategorys(getCategory());
		return vo;
	}

	private List<CategoryVO> getCategory() {
		List<CategoryVO> list = new ArrayList<CategoryVO>();
		list.add(new CategoryVO("动物面膜", "http://asset.ibanquan.com/image/5a73f9eb921f5078620009cd/s.jpeg?v=1517550059", "￥50"));
		list.add(new CategoryVO("NAVIDA主机", "http://asset.ibanquan.com/image/590995610dd76c2295001508/s.jpeg?v=1493800290", "￥2000"));
		list.add(new CategoryVO("海盗船键盘", "http://asset.ibanquan.com/image/591e8b763f8f90303200040b/s_w360h360.jpeg?v=1495174006", "￥800"));
		list.add(new CategoryVO("动物面膜", "http://asset.ibanquan.com/image/5a73f9eb921f5078620009cd/s.jpeg?v=1517550059", "￥50"));
		list.add(new CategoryVO("NAVIDA主机", "http://asset.ibanquan.com/image/590995610dd76c2295001508/s.jpeg?v=1493800290", "￥2000"));
		list.add(new CategoryVO("海盗船键盘", "http://asset.ibanquan.com/image/591e8b763f8f90303200040b/s_w360h360.jpeg?v=1495174006", "￥800"));
		list.add(new CategoryVO("NAVIDA主机", "http://asset.ibanquan.com/image/590995610dd76c2295001508/s.jpeg?v=1493800290", "￥2000"));
		list.add(new CategoryVO("海盗船键盘", "http://asset.ibanquan.com/image/591e8b763f8f90303200040b/s_w360h360.jpeg?v=1495174006", "￥800"));
		return list;
	}

	private ContentPic getContentPic() {
		ContentPic pic = new ContentPic();
		pic.setCarousel(new String[]{"http://asset.ibanquan.com/asset/5a9240cd921f5051950007a6/index_slide_p3?v=1519534285"
				,"http://asset.ibanquan.com/asset/5a2f791222bd3406c0001be0/index_slide_p4?v=1513060626"
				,"http://asset.ibanquan.com/asset/5aa8caed3f8f90632e000c15/index_slide_p2?v=1521011437"});
		pic.setSmallPic(new String[]{"http://asset.ibanquan.com/asset/5a2f791222bd3406c0001bda/index_slide_right_p1?v=1513060626"
				,"http://asset.ibanquan.com/asset/5a94d3673f8f9065ab00013b/index_slide_right_p2?v=1519702887"});
		return pic;
	}

	private List<NavVO> getNav() {
		List<NavVO> list = new ArrayList<NavVO>();
		list.add(new NavVO("首页","/",null));
		list.add(new NavVO("海淘","/",null));
		list.add(new NavVO("玩具","/",null));
		list.add(new NavVO("宠物用品","/",null));
		list.add(new NavVO("家庭用品","/",null));
		
		NavVO vo = new NavVO("键盘","/",null);
		NavVO vo1 = new NavVO("鼠标","/",null);
		NavVO vo2 = new NavVO("显示器","/",null);
		
		List<NavVO> child = new ArrayList<NavVO>();
		child.add(vo);
		child.add(vo1);
		child.add(vo2);
		
		
		list.add(new NavVO("电脑相关","/",child));
		return list;
	}
	
	
	
}
